// mockjs的测试数据(模拟后台)

import { Random } from 'mockjs'
import { MockMethod } from 'vite-plugin-mock'
export default [
  {
    url: '/api/user/info',
    method: 'get',
    response: () => {
      return {
        code: 200,
        data: {
          name: '唐玮',
          age:22,
          avatar:"../../../public/imgs/tw.jpg",
          permissions:['editor_markdown','editor_base','article_edit']
        },
      }
    },
  },
  {
    url:'/api/login',
    method: 'post',
    response: () => {
      return {
        code:200,
        data: {
          token:Random.string(10)
        }
      }
    }
  }
 
] as MockMethod[]